<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>跑马灯table</title>
</head>
<style>
    th, td {
        padding: 5px;
        text-align: center;
    }
</style>
<body>
<table  >
    <thead>
    <tr>
        <th width="80%">详情</th>
        <th>编号</th>
    </tr>
    </thead>
</table>
<table  >
    <tr>
        <td align="center">
            <div id=rolllinkk style="OVERFLOW: hidden; WIDTH: 256px; HEIGHT: 100px">
                <div id=rolllinkk1>
                    <table width="100%" cellpadding="2" style="background: red">
                        <tr>
                            <td align="center" width="80%">最牛交通工具 1</td>
                            <td>1</td>
                        </tr>
                        <tr>
                            <td align="center" width="80%">最牛交通工具 1</td>
                            <td>1</td>
                        </tr>
                        <tr>
                            <td align="center" width="80%">最牛交通工具 1</td>
                            <td>1</td>
                        </tr>
                        <tr>
                            <td align="center" width="80%">最牛交通工具 1</td>
                            <td>1</td>
                        </tr>
                    </table>
                </div>
                <div id=rolllinkk2>
                    <div align=center></div>
                </div>
            </div>
        </td>
    </tr>
</table>
<script>
    var rollspeed = 30
    rolllinkk2.innerHTML = rolllinkk1.innerHTML //
    function Marquee1() {
        if (rolllinkk2.offsetTop - rolllinkk.scrollTop <= 0) //
            rolllinkk.scrollTop -= rolllinkk1.offsetHeight //
        else {
            rolllinkk.scrollTop++
        }
    }

    var MyMar1 = setInterval(Marquee1, rollspeed) //
    rolllinkk.onmouseover = function () {
        clearInterval(MyMar1)
    }
    rolllinkk.onmouseout = function () {
        MyMar1 = setInterval(Marquee1, rollspeed)
    }
</script>
</body>
</html>
